package com.test.service.impl;

import com.test.mapper.FolderMappingMapper;
import com.test.service.FolderMappingService;
import com.test.vo.FolderInfoVO;
import com.ty.basic.response.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigInteger;

@Slf4j
@Service
public class FolderMappingServiceImpl implements FolderMappingService {


    @Resource
    FolderMappingMapper folderMappingMapper;

    @Override
    public ResponseResult<FolderInfoVO> getFolerInfoByOid(ResponseResult<FolderInfoVO> result, BigInteger oid) {
        try {
            FolderInfoVO folderInfoVO = folderMappingMapper.getFolerInfoByOid(oid);
            result.setData(folderInfoVO);
            result.setSuccess(true);
        } catch (Exception e) {
            result.setSuccess(Boolean.FALSE);
            result.setMessage(e.getMessage());
        }
        return result;
    }
}
